import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/user/info',
    method: 'post'

  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'get'
  })
}
export function addUser(params) {
  return request({
    url: '/user/insert',
    method: 'get',
    params
  })
}
export function selecctAllUser(params) {
  return request({
    url: '/user/selecctAllUser',
    method: 'get',
    params
  })
}
export function update(params) {
  return request({
    url: '/user/update',
    method: 'get',
    params
  })
}

export function deleteByUserId(params) {
  return request({
    url: '/user/delete',
    method: 'get',
    params
  })
}
